version: '3.8'

services:
  psql:
    image: postgres:latest
    environment:
      POSTGRES_DB: ${DB_DATABASE}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_PASSWORD: ${DB_PASSWORD}
    ports:
      - "${DB_PORT}:5432"
    volumes:
      - psql_volume:/var/lib/postgresql/data

volumes:
  psql_volume: